<html>
<head><meta charset="utf-8"><title>fallible `Lift` · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/fallible.20.60Lift.60.html">fallible `Lift`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213600937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/fallible%20%60Lift%60/near/213600937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/fallible.20.60Lift.60.html#213600937">(Oct 16 2020 at 19:00)</a>:</h4>
<p>can lift actually fail nowadays?</p>
<p>Afaik we only have one <code>TyCtxt</code> in total rn so I would expect the following comment to be out of date:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="sd">/// `None` is returned if the value or one of the components is not part</span>
<span class="sd">/// of the provided context.</span>
<span class="sd">/// For `Ty`, `None` can be returned if either the type interner doesn't</span>
<span class="sd">/// contain the `TyKind` key or if the address of the interned</span>
<span class="sd">/// pointer differs. The latter case is possible if a primitive type,</span>
<span class="sd">/// e.g., `()` or `u8`, was interned in a different context.</span>
</code></pre></div>



<a name="213606213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/fallible%20%60Lift%60/near/213606213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/fallible.20.60Lift.60.html#213606213">(Oct 16 2020 at 19:51)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="119009">@eddyb</span></p>



<a name="213606288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/fallible%20%60Lift%60/near/213606288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/fallible.20.60Lift.60.html#213606288">(Oct 16 2020 at 19:51)</a>:</h4>
<p>I think it can trivially fail e.g. if you manually create a value and then print it without ever interning it</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>